home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 34 / Mac Magazin and MacEasy Magazine CD - Issue 34.iso / Grafik & Text / Alpha ƒ / Tcl / Modes / latexMode.tcl < prev    next >
Text File  |  1997-03-11  |  2KB  |  51 lines

  1. #############################################################################
  2. #############################################################################
  3. #
  4. # latexMode.tcl (called from modes.tcl at startup)
  5. #
  6. #############################################################################
  7. #############################################################################
  8.  
  9. # LaTeX version installation:
  10. set latexVersion "2e"
  11. catch { enableMenuItem install "LaTeX 2e" off }
  12. catch { enableMenuItem install "LaTeX 2.09" on }
  13.  
  14. # Initialize TeX mode:
  15. addMode TeX dummyTeX {*.tex *.ltx *.dtx *.ins *.cls *.clo *.sty *.log *.aux *.bbl *.idx *.ind *.glo *.gls *.toc *.lof *.lot *.blg *.ilg } latexMenu
  16. # set dummyProc(TeX) dummyTeX
  17.  
  18. # Initialize LaTeX menu:
  19. addMenu latexMenu
  20. set latexMenu "•270"
  21. # set modeMenus(TeX) latexMenu
  22.  
  23. # Reset the search path so it will be rebuilt the next time it's needed:
  24. set TeXSearchPath {}
  25.  
  26. # Initialize TeX-related application signatures:
  27. foreach app {tex viewDVI printDVI dvips viewPS printPS bibtex makeindex} {
  28.     if { ![info exists ${app}Sig] } {
  29.         set ${app}Sig {}
  30.     }
  31. }
  32.  
  33. # Install the short LaTeX menu, by default:
  34. set useShortLaTeXMenu 1
  35.  
  36. # Global variable for reference completion:
  37. set __wc__insPos -1
  38.  
  39. # Clean up temporary files:
  40. proc removeTemporaryFiles {} {
  41.     global PREFS
  42.     if { [file exists "$PREFS:tmp"] } {
  43.         foreach f [glob -nocomplain "$PREFS:tmp:*"] {
  44.             message "removing [file tail $f]…"
  45.             removeFile $f
  46.         }
  47.     }
  48.     message "all temporary files removed"
  49. }
  50. if { $startingUp } { removeTemporaryFiles }
  51.